<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>欢迎光临 Music Store</title>
<link type="text/css" rel="Stylesheet" href="style/front.css" />
<style>

</style>
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<div id="header-logo">
				<a href="index.jsp">&quot;<img src="style/images/logo.png" alt=""></img>
				</a>
			</div>
			<div id="header-login">
				<a href="#">登录</a> | <a href="#">注册</a>
			</div>
			<div class="clearBoth"></div>
			<div id="header-search">
				<input id="keyword" type="text" /><input id="btnSearch"
					type="button" value="搜索" />
			</div>
			<div id="header-nav">
				<ul>
					<li><a href="#">首页</a>
					</li>
					<li><a href="#">商店</a>
					</li>
					<li><a href="#">购物车</a>
					</li>
					<li><a href="#">个人信息</a>
					</li>
				</ul>
				<label id="welcome">您好，${user}。</label>
			</div>
		</div>
		<div id="content">
			<div id="sidebar">
				<h3>唱片分类</h3>
				<form action="AlbumServlet" method="get">
				<ul class="categories">
					<c:forEach items="${genre }" var="g" varStatus="vs">
					<c:if test="${vs.index%2==0 }">
						<li><a href="AlbumServlet?gid=${g.id }" target="_self">${g.name }</a>
						</li>
					</c:if>
					<c:if test="${vs.index%2!=0 }">
						<li><a href="AlbumServlet?gid=${g.id }" target="_self" class="even">${g.name }</a>
					</li>
					</c:if>
					</c:forEach>
				</ul>
				</form>
			</div>
			<div id="main">
				<h3 id="main-title">最新热销唱片</h3>
				<div id="hotAlbums">
					<form action="AlbumServlet" method="get">
					<c:forEach items="${album}" var="a">
					<dl class="hotAlbumsItem">
						<dt>
							<a href="AlbumDetailServlet?id=${a.id }&&genreid=${a.genreID}"><img src="CoverImages/${a.id }.jpg" />
							</a>
								${a.title }
								${a.artist}
						</dt>
					</dl>
					</c:forEach>
					</form>
				</div>
			</div>
			<div class="clearBoth"></div>
		</div>
		<div id="footer">
			<div id="footer-ad">
				<img src="style/images/footer.png" alt=""></img>
			</div>
			<div id="footer-contactUs">
				<p>Music Store</p>
				<p>Design by Sam"", July,2011.</p>
			</div>
		</div>
	</div>
</body>
</html>

